package com.lin.service;

import com.lin.spring.*;

import javax.annotation.PostConstruct;

/**
 * @ClassName UserService
 * @Description
 * @Author lin
 * @Date 2022/4/4 下午4:07
 * @Version V1.0
 */
@Component("userService")
// @Scope("property")
public class UserService implements BeanNameAware, InitializingBean {
    private String MyBeanName;

    @Autowired
    private OrderService orderService;

    public OrderService getOrderService() {
        return orderService;
    }

    public void setOrderService(OrderService orderService) {
        this.orderService = orderService;
    }

    public String getMyBeanName() {
        return MyBeanName;
    }

    public void setMyBeanName(String myBeanName) {
        MyBeanName = myBeanName;
    }

    @Override
    public void setName(String name) {
        this.MyBeanName = name;
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println("初始化bena属性时可以做一些事，比如属性赋值");
    }



}
